// components/MyCom/MyCom.js
let timeId
Component({
    data:{
        num:100
    },
    lifetimes: {
        attached(){
            console.log("发送异步请求");
            // timeId = setInterval(()=>{
            //     this.setData({num:Date.now()})
            //     console.log(Date.now());
            // },1000)
        },
        detached(){
            clearInterval(timeId)
        }
    }
})
